<?php

class Form_ReportForm extends Form_Custom_General {

    public function init() {
        
        $agent_name = $this->createElement('select', 'agent_name')
                ->setRequired(TRUE)
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    new Zend_Filter_StringToLower()
                ))
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => "Please select agent")));
        $this->addElement($agent_name);
        
        $start_date = $this->createElement('text', 'start_date')
                 ->setRequired(TRUE)
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => "Please select startdate")))
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    new Zend_Filter_StringToLower()
                ))
                ->setAttribs(Array("size" => "60","class"=>"span6 datepicker", "readonly" => "readonly"));
        $this->addElement($start_date);
        
        $end_date = $this->createElement('text', 'end_date')
                ->setRequired(TRUE)
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => "Please select enddate")))
                 ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    new Zend_Filter_StringToLower()
                ))
                ->setAttribs(Array("size" => "60","class"=>"span6 datepicker", "readonly" => "readonly"));
        $this->addElement($end_date);
        
        

        $submit = $this->createElement('submit', 'Save')
                ->setAttribs(Array('title' => "Save changes", 'class' => "btn-glow primary"));
        $this->addElement($submit);

        $reset = $this->createElement('reset', 'Reset')
                ->setAttribs(Array('title' => "Save changes and continue to edit", 'class' => "btn-glow primary"));
        $this->addElement($reset);
    }

}